fix: .plot should accept minval/maxval as an array for the channels: [0,0,0]
[supercollider.git] / examples / pieces / Poeme Symphonique.scd
blob140877c3e26cc8553daedeb1c6a7b0fc1eec1369
2 // (thor magnusson) (c 2007)
4 // A reinterpretation of the Po�me symphonique was composed by Gyšrgy Ligeti (in 1962)
5 // http://www.youtube.com/watch?v=QCp7bL-AWvw
8 SynthDef(\ligetignome, {arg tempo=1, filterfreq=1000, rq=1.0;
9 var env, signal;
10         var rho, theta, b1, b2;
11         b1 = 2 * 0.996839 * cos(0.0931624);
12         b2 = 0.996839.squared.neg;
13         signal = SOS.ar(Impulse.ar(tempo), 1.0, 0.0, 0.0, b1, b2);
14         signal = RHPF.ar(signal, filterfreq, rq);
15         Out.ar(0, Pan2.ar(signal, 0));
16 }).add;
19 // and we create 10 different metronomes running in different tempi
20 // (try with 3 metros or 30 metros)
22 13.do({
23         Synth(\ligetignome).set(
24                 \tempo, (rrand(0.5,1.5)).reciprocal, 
25                 \filterfreq, rrand(2000,4000), 
26                 \rq, rrand(0.3,0.9) )
27 });
30 // -----------
32 // and something totally else... ligeti's brother:
35 var trig;
36 var wait = 4;
37 Task({
38         20.do({
39                 trig = [1, 1.5].wchoose([0.7, 0.3]);
40                 {Resonz.ar(Impulse.ar(trig, 0, 50*rrand(5,10)), Rand(200,2000), 0.003) ! 2}.play;
41                 (wait + rrand(0.1,1)).wait;
42                 wait = wait - rrand(0.01, 0.2);
43         });
44         "thank you! you can now stop this program at any point!".postln;
45 }).play